Developing a mobile app about Films using The MovieDB API.
I've got the code so it randomises a film, the only problem I have is that it doesn't display on the main page.
Code is Code: $(document).on('pageinit', '#home', function(){
// $(document).ready(function(){
console.info('hi');
var latestUrl = 'https://api.themoviedb.org/3/movie/latest?',
singleUrl = 'https://api.themoviedb.org/3/movie/'
mode = 'search/movie?query=',
key = '&api_key=***',
latestId = 0,
targetId = 0;
$.ajax({
url: latestUrl + key ,
dataType: "jsonp",
async: true,
success: function (result) {
console.dir(result);
// ajax.parseJSONP(result);
latestId = result.id;
console.dir(latestId);
targetId = Math.floor(Math.random() * latestId);
&n CodingForums...
ما را در سایت CodingForums دنبال می کنید
برچسب : نویسنده : codingforums بازدید : 182 تاريخ : جمعه 20 بهمن 1396 ساعت: 16:05